<div class="row container">
<div class="col-md-12"> 
<div class="panel panel-success">
	
	<div class="panel-heading">
	   <a href="<?php echo $this->url('resources',array('controller'=>'Speaker','action'=>'add'));?>" class="btn btn-info" role="button"><span class="glyphicon glyphicon-plus-sign" aria-hidden="true"></span> Add Speakers &raquo;</a>
	   <!-- <a href=" --><?php // echo $this->url('resources',array('controller'=>'Speaker','action'=>'search'));?><!-- " class="btn btn-info pull-right" role="button"><span class="glyphicon glyphicon-search" aria-hidden="true"></span> Search &raquo;</a> -->
	</div>
	
	<div class="panel-body">
	<div class="table-responsive">
		<table class="table table-bordered table-striped">
				<tr>
				    <th>No</th>
					<th>Name</th>	
					<th>Gender</th>
					<th>Remark</th>
					<th>Option</th>
				</tr>
				<?php $number=0;?>
				<?php foreach ($this->paginator as $speaker) : ?>
				<tr>       	
				            <td><?php echo ++$number;?></td>
				                <?php
    				                if($this->escapeHtml($speaker->TITLE)==1){
    				                    $title="Rev";
    				                }
    				                else if($this->escapeHtml($speaker->TITLE)==2){
    				                    $title="Ps";
    				                }
    				                else if($this->escapeHtml($speaker->TITLE)==3){
    				                    $title="Mr";
    				                }
    				                else if($this->escapeHtml($speaker->TITLE)==4){
    				                    $title="Mrs";
    				                }
    				                else if($this->escapeHtml($speaker->TITLE)==5){
    				                    $title="Miss";
    				                }
    				                else if($this->escapeHtml($speaker->TITLE)==6){
    				                    $title="Dr";
    				                }
    				                else if($this->escapeHtml($speaker->TITLE)==7){
    				                    $title="Prof";
    				                }
    				                else if($this->escapeHtml($speaker->TITLE)==8){
    				                    $title="";
    				                }?>
    				                	
        			        <td><?php echo $title." ".$this->escapeHtml($speaker->FIRST_NAME)." ".$this->escapeHtml($speaker->MIDDLE_NAME)." ".$this->escapeHtml($speaker->LAST_NAME);?></td>
        			            <?php 
            			            if($this->escapeHtml($speaker->GENDER)==1){
            			                $gender="Male";
            			            }
            			            else if($this->escapeHtml($speaker->GENDER)==2){
            			                $gender="Female";
            			            }
        			            ?>
        					<td><?php echo $gender;?></td>
        					<td><?php echo $this->escapeHtml($speaker->REMARK);?></td>        					
        					<td>
                                 <div class="btn btn-default"><a href="<?php echo $this->url('resources',array('controller'=>'Speaker','action'=>'edit', 'id' => $speaker->ID));?>"><span class="glyphicon glyphicon-edit" aria-hidden="true"></span></a></div>
                            </td>	        			
        		</tr>
        		<?php endforeach; ?>
		</table>
		<?php 
    		// add at the end of the file after the table
            echo $this->paginationControl(
            // the paginator object
            $this->paginator,
            // the scrolling style
            'sliding',
            // the partial to use to render the control
            'partial/paginator.phtml',
            // the route to link to when a user clicks a control link
            array(
               // 'route' => 'events'
                )
            );
         ?>
		
	</div>
	</div>
	<div class="pull-right" style="padding:0.2em 0 0 0.2em"><a href="<?php echo $this->url('resources',array('controller'=>'Session','action'=>'email'));?>" class="btn btn-info" role="button"><span class="glyphicon glyphicon-envelope" aria-hidden="true"></span> Email &raquo;</a></div>
	<div class="pull-right" style="padding:0.2em 0 0 0.2em"><a class="btn btn-info" role="button" onclick="window.print()" target="_blank"><span class="glyphicon glyphicon-print" aria-hidden="true"></span> Print	&raquo;</a></div>
</div>
</div>
</div>
